package cn.iocoder.yudao.module.ao.dal.mysql.vocationalclassschedule;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ao.dal.dataobject.vocationalclassschedule.VocationalClassScheduleDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ao.controller.admin.vocationalclassschedule.vo.*;

/**
 * 中高技班级课 Mapper
 *
 * @author 禾安
 */
@Mapper
public interface VocationalClassScheduleMapper extends BaseMapperX<VocationalClassScheduleDO> {

    default PageResult<VocationalClassScheduleDO> selectPage(VocationalClassSchedulePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<VocationalClassScheduleDO>()
                .eqIfPresent(VocationalClassScheduleDO::getTerm, reqVO.getTerm())
                .likeIfPresent(VocationalClassScheduleDO::getClassName, reqVO.getClassName())
                .eqIfPresent(VocationalClassScheduleDO::getClassSection, reqVO.getClassSection())
                .eqIfPresent(VocationalClassScheduleDO::getMondayCourse, reqVO.getMondayCourse())
                .eqIfPresent(VocationalClassScheduleDO::getTuesdayCourse, reqVO.getTuesdayCourse())
                .eqIfPresent(VocationalClassScheduleDO::getWednesdayCourse, reqVO.getWednesdayCourse())
                .eqIfPresent(VocationalClassScheduleDO::getThursdayCourse, reqVO.getThursdayCourse())
                .eqIfPresent(VocationalClassScheduleDO::getFridayCourse, reqVO.getFridayCourse())
                .eqIfPresent(VocationalClassScheduleDO::getClassTeacher, reqVO.getClassTeacher())
                .eqIfPresent(VocationalClassScheduleDO::getClassroom, reqVO.getClassroom())
                .orderByDesc(VocationalClassScheduleDO::getId));
    }

}